# encoding: utf-8
# @File  : login_page_locators.py
# @Author: ShiMingliang
# @Date  :  2025/08/04
# PythonIntelligentRecruitmentDataAnalysisSystem
from selenium.webdriver.common.by import By


class LoginPageLocators:
	"""登录页面元素定位器类"""

	# 使用更简洁的定位方式，避免绝对XPath
	USERNAME = (By.ID, "username")
	PASSWORD = (By.NAME, "password")
	LOGIN_BUTTON = (By.TAG_NAME, "button")

	# 成功消息可以使用更简洁的XPath或CSS选择器
	SUCCESS_MESSAGE = (By.XPATH, "/html/body/div/div/aside/div[1]/a")  # 替代原来的绝对XPath
	# 错误提示可以使用相对XPath或更具体的定位方式
	USERNAME_ERROR = (By.XPATH, "/html/body/div/div/div/form/div[1]/span[1]")
	PASSWORD_ERROR = (By.XPATH, "/html/body/div/div/div/form/div[2]/span[1]")


if __name__ == '__main__':
	a=LoginPageLocators.USERNAME
	print(a[0],a[1])
	print(*a)